www.gusucode.com > 6KBBS ASP版 V7.1 > 6KBBS ASP版 V7.1\code\bbs\Online.asp

    <!--#include file="conn.asp"--><!--#include file="inc/fun.asp"-->
<%
dim Cssstyleid,styleid
Cssstyleid=request.cookies(prefix&"1")("styleid")
styleid="skin/"&Cssstyleid&"/images"

%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"><script>
if (top.location==self.location){
	top.location="index.asp"
}
</script>
<link rel="stylesheet" type="text/css" href="skin/<%=Cssstyleid%>/global.css">
</head>

<%

dim onlinetj,sql,onnum,i,nowon,pic,lasttime,usertype,bd
bd=checknum(request.querystring("bd"))
usertype=checknum(session(prefix&"usertype"))
onlinetj=request.querystring("onlinetj")
if onlinetj="index" then sql="select*from online order by userid desc"
if onlinetj="bd" then sql="select*from online where onbd="&bd&" order by userid desc"
set rs = server.createobject("adodb.recordset")
rs.Open sql,conn,1
onnum=rs.recordcount
response.write"<table border=0 cellpadding=0 cellspacing=0 style='border-collapse: collapse' bordercolor=#111111 width=100% ><tr>"
dim td,onlinename,action,seeuser
td=1
for i=1 to onnum
td=td+1
nowon=rs("nowon")
if isnull(nowon) or nowon="" then nowon="论坛首页"
onlinename=rs("name")
pic=rs("pic")
if pic=0 then onlinename="游客"
if rs("showyn")=false then onlinename="隐士":pic=6
lasttime=rs("lasttime")
if datediff("n",lasttime,now)<10 then
action="[<font color=red>活跃</font>]"
else
action="[<font color=#808080>发呆</font>]"
end if
if usertype>=4 then
seeuser=rs("ip")
else
seeuser="保密"
end if
seeuser="最后更新:"&lasttime+timeset/24&"&#13;&#10;IP 地 址:"&seeuser&"&#13;&#10;当前位置:"&nowon&""
response.write"<td width=20% ><a title='"&seeuser&"'><img src="&styleid&"/"&pic&".gif border=0> "&checktitle(onlinename)&" "&action&"</a></td>"
if td>5 then response.write"</tr>":td=1
rs.movenext
next
rs.close
set rs=nothing
response.write"</tr></table>"
%>